<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="./write.css">
</head>
<body>
    <div class="app">
        <div class="header">来，说说你在做什么，想什么</div>
            <div class="top">
                <input type="text" v-model="userName">
                <div class="allpic">
                    <div class="pic"  v-for="(item, index) in items" >
                        <img :src="`https://www.jq22.com/demo/jquery-lyb20151124/img/face${index + 1}.gif`" alt="" :class="{ opacity: activeIndex === index }"@click="activeIndex = index">
                    </div>
                </div>
            </div>
        <textarea name="" id="" v-model="content"></textarea>
        <div class="edit"><p>还能输入<span class="num">140</span>个字</p><button class="btn" @click="addcon">广播</button></div>
        <div class="out"><p class="in">大家在说</p></div>
        <ul class="con">
             <li v-for="(item, index) in allcon" >
                <img :src="`https://www.jq22.com/demo/jquery-lyb20151124/img/face${index+1}.gif`" alt="" :key="item.time">
                <div>
                    <p>{{ item.userName }}:{{ item.content }}</p>
                    <p>{{item.time.toLocaleString()}}</p>
                </div>
                <button @click="deletecon" class="del">Delete</button>
            </li>
            <!-- <li>
                <img src="https://www.jq22.com/demo/jquery-lyb20151124/img/face5.gif" alt="">
                <div>
                    <p>张三：好好学习，天天向上。</p>
                    <p>07月05日 15：36</p>
                </div>
                <div class="del">删除</div>
            </li> -->
        </ul>
    </div>
    <script src="./vue.js"></script>
    <script src="./write.js"></script>
</body>
</html>